<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        console.log(b);//undefind
        var b = "es5";
        // console.log(a);//Cannot access 'a' before initialization
        // let a = "es6";
        const PI="3.14159265358……";
       // PI=12;//Assignment to constant variable
        console.log(PI);
       // const My;//Missing initializer in const declaration
        //暂时性死区
        var IP="192.128";
        if(true){
            console.log(IP);//直接报错 Cannot access 'IP' before initialization
            const IP = "3.14159265358……"
        }

    </script>
</body>
</html>